﻿<!--
    Deep Earth is a community project available under the Microsoft Public License (Ms-PL)
    Code is provided as is and with no warranty – Use at your own risk
    View the project and the latest code at http://DeepEarth.codeplex.com/
-->

<ResourceDictionary 
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"  
    xmlns:DeepControls="clr-namespace:DeepEarth.Client.MapControl.Controls;assembly=DeepEarth.Client.MapControl" 
    xmlns:MapControl="clr-namespace:DeepEarth.Client.MapControl" 
    xmlns:DeepGeometries="clr-namespace:DeepEarth.Client.MapControl.Geometries" 
    mc:Ignorable="d">

    <!--Style Map-->
    <Style TargetType="MapControl:Map">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="MapControl:Map">
                    <Grid>
                        <Grid x:Name="PART_LayoutRoot">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Grid x:Name="PART_MapContent" Grid.RowSpan="2" RenderTransformOrigin="0.5,0.5">
                                <Grid.RenderTransform>
                                    <RotateTransform x:Name="PART_MapRotation" />
                                </Grid.RenderTransform>
                                <DeepControls:MouseControl x:Name="PART_MouseControl"/>
                                <Grid x:Name="PART_MapLayers" />
                                <Image x:Name="PART_ModeCrossFade" IsHitTestVisible="False"/>
                            </Grid>
                            <StackPanel x:Name="PART_LicenseContainer" Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Left" Margin="48,0,0,0" />
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--Style MouseControl -->
    <Style TargetType="DeepControls:MouseControl">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="DeepControls:MouseControl">
                    <Canvas>
                        <Rectangle x:Name="PART_PixelBox"
                                   Fill="#3E1157DC" 
                                   Stroke="#FF0781F7" 
                                   StrokeDashArray="20, 8" 
                                   StrokeEndLineCap="Round" 
                                   StrokeDashCap="Round" 
                                   StrokeThickness="1.5" 
								   RadiusY="8" RadiusX="8"/>
                    </Canvas>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="DeepGeometries:PointControl">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="DeepGeometries:PointControl">
                    <Grid>
                        <Grid.RenderTransform>
                            <CompositeTransform x:Name="PART_CompositeTransform" />
                        </Grid.RenderTransform>
                        <Ellipse Height="15" Width="15" Fill="Yellow" Stroke="RoyalBlue" StrokeThickness="2" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="DeepGeometries:PathControlBase">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="DeepGeometries:PathControlBase">
                    <Canvas>
                        <Path x:Name="PART_path"/>
                    </Canvas>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>
